package com.java.module.chat.domain.vo;

import com.java.module.chat.domain.ChatMessage;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.java.common.lang.annotation.Excel;
import com.java.common.lang.annotation.FileData;
import com.java.common.lang.domain.BaseEntity;

/**
 * 聊天：消息对象 chat_message
 * 
 * @author Administrator
 * @date 2021-05-13
 */
@FileData
public class ChatMessageVO extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long messageId;

    /** 消息id */
    private Long sessionId;

    /** $column.columnComment */
    private Long adminSessionId;

    /** 平台标志：1安卓 2苹果 3电脑 */
    @Excel(name = "平台标志：1安卓 2苹果 3电脑")
    private Integer platform;

    /** ip地址 */
    @Excel(name = "ip地址")
    private String ipaddress;

    /** 客服对象：0售前 1售中 2售后 */
    @Excel(name = "客服对象：0售前  1售中  2售后")
    private Integer chatType;

    /** 会话类型：
     * 1单聊 2圈子群聊 3帮助救扶群聊 4活动
     * */
    @Excel(name = "会话类型：1单聊 2群聊", readConverterExp = "保=留字段")
    private Integer sessionType;

    /** 消息类型：1文本 2图片 */
    @Excel(name = "消息类型：1文本 2图片 3音频")
    private Integer msgType;

    /** 消息状态：0未读 1已读 */
    @Excel(name = "消息状态：0未读 1已读")
    private Integer msgStatus;

    /** 发送者uid */
    @Excel(name = "发送者uid")
    private Long msgFromUid;

    /** 接收者uid */
    @Excel(name = "接收者uid")
    private Long msgToUid;

    /** 消息内容 */
    @Excel(name = "消息内容")
    private String msgContent;

    /** 发送者删除状态：0默认 1已删除 */
    @Excel(name = "发送者删除状态：0默认 1已删除 ")
    private Integer msgFromIsdel;

    /** 接收者删除状态：0默认 1已删除 */
    @Excel(name = "接收者删除状态：0默认 1已删除")
    private Integer msgToIsdel;

    /** 视频封面图片 */
    @Excel(name = "视频封面图片")
    @FileData
    private String videoPic;

    /** 删除标志（0默认 非0表示已删除） */
    private Integer delFlag;

    /** 头像 */
    @FileData
    private String avatar;

    /** 昵称 */
    private String nickname;

    /** 类型 0用户 1后台 */
    private Integer userType;

    /** 登录用户是否为发送方 */
    private Boolean isChatSender;

    private ChatMessage.MsgExtra msgExtra;


    /**
     * 群聊头像和昵称
     * */
    private String name;
    @FileData
    private String pic;


    private Integer type;

    /**
     * 是否实名认证
     */
    private Integer isCertification;


    private Integer duration;

    public Integer getIsCertification() {
        return isCertification;
    }

    public void setIsCertification(Integer isCertification) {
        this.isCertification = isCertification;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public ChatMessage.MsgExtra getMsgExtra() {
        return msgExtra;
    }

    public void setMsgExtra(ChatMessage.MsgExtra msgExtra) {
        this.msgExtra = msgExtra;
    }
    
    public void setMessageId(Long messageId) {
        this.messageId = messageId;
    }

    public Long getMessageId() {
        return messageId;
    }

    public Long getSessionId() {
        return sessionId;
    }

    public void setSessionId(Long sessionId) {
        this.sessionId = sessionId;
    }

    public Long getAdminSessionId() {
        return adminSessionId;
    }

    public void setAdminSessionId(Long adminSessionId) {
        this.adminSessionId = adminSessionId;
    }

    public void setPlatform(Integer platform) {
        this.platform = platform;
    }

    public Integer getPlatform() {
        return platform;
    }

    public void setIpaddress(String ipaddress) {
        this.ipaddress = ipaddress;
    }

    public String getIpaddress() {
        return ipaddress;
    }

    public void setChatType(Integer chatType) {
        this.chatType = chatType;
    }

    public Integer getChatType() {
        return chatType;
    }

    public void setSessionType(Integer sessionType) {
        this.sessionType = sessionType;
    }

    public Integer getSessionType() {
        return sessionType;
    }

    public void setMsgType(Integer msgType) {
        this.msgType = msgType;
    }

    public Integer getMsgType() {
        return msgType;
    }

    public void setMsgStatus(Integer msgStatus) {
        this.msgStatus = msgStatus;
    }

    public Integer getMsgStatus() {
        return msgStatus;
    }

    public void setMsgFromUid(Long msgFromUid) {
        this.msgFromUid = msgFromUid;
    }

    public Long getMsgFromUid() {
        return msgFromUid;
    }

    public void setMsgToUid(Long msgToUid) {
        this.msgToUid = msgToUid;
    }

    public Long getMsgToUid() {
        return msgToUid;
    }

    public void setMsgContent(String msgContent) {
        this.msgContent = msgContent;
    }

    public String getMsgContent() {
        return msgContent;
    }

    public void setMsgFromIsdel(Integer msgFromIsdel) {
        this.msgFromIsdel = msgFromIsdel;
    }

    public Integer getMsgFromIsdel() {
        return msgFromIsdel;
    }

    public void setMsgToIsdel(Integer msgToIsdel) {
        this.msgToIsdel = msgToIsdel;
    }

    public Integer getMsgToIsdel() {
        return msgToIsdel;
    }

    public void setVideoPic(String videoPic) {
        this.videoPic = videoPic;
    }

    public String getVideoPic() {
        return videoPic;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickName) {
        this.nickname = nickName;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Boolean getIsChatSender() {
        return isChatSender;
    }

    public void setIsChatSender(Boolean isChatSender) {
        this.isChatSender = isChatSender;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("messageId", getMessageId())
                .append("sessionId", getSessionId()).append("adminSessionId", getAdminSessionId())
                .append("platform", getPlatform()).append("ipaddress", getIpaddress()).append("chatType", getChatType())
                .append("sessionType", getSessionType()).append("msgType", getMsgType())
                .append("msgStatus", getMsgStatus()).append("msgFromUid", getMsgFromUid())
                .append("msgToUid", getMsgToUid()).append("msgContent", getMsgContent())
                .append("msgFromIsdel", getMsgFromIsdel()).append("msgToIsdel", getMsgToIsdel())
                .append("videoPic", getVideoPic()).append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime()).append("delFlag", getDelFlag()).append("avatar", getAvatar())
                .append("nickname", getNickname()).append("userType", getUserType())
                .append("isChatSender", getIsChatSender()).toString();
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }
}